#ifndef TRACE_DEF_H
#define	TRACE_DEF_H

#include <string>
#include <vector>
#include <fstream>

/**
 * A trace item specifies which module, function to be traced.
 * It also specifies what function to be excluded while tracing.
 */
class TraceItem {
    std::string module;
    std::vector<std::string> function;
    std::vector<std::string> exclude;
public:
    TraceItem() {}
    /**
     * Parse one line definition of trace module and function.
     * Return 0 on success, -1 on error.
     */
    static int parse(std::string def, TraceItem& item);
    /**
     * Output the trace clause for the item to the stream.
     */
    friend std::ostream& operator<<(std::ostream& , TraceItem&);
};

#endif // TRACE_DEF_H

